﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Projet_Final_ASP
{
    public partial class Checkout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void cmdAnnuler_Click(object sender, EventArgs e)
        {
            Response.Redirect("ShoppingCart.aspx");
        }

        protected void cmdContinuer_Click(object sender, EventArgs e)
        {
            string client = User.Identity.Name;
            string produitBD = Session["produitBD"].ToString();
            decimal total = (decimal)Session["prix"];
            int noPanier = AccesBD.DernierNo();
            AccesBD.AjouterCommande(noPanier,client, produitBD, total);
            Session.Remove("shoppingCart");
            Response.Redirect("Confirmation.aspx");
        }

    }
}